package com.multi.thread.chapter07.demo04;

public class MainGroup {
	
	public static void main(String[] args) {
		System.out.println("线程组名称为：" + Thread.currentThread().getThreadGroup().getName());
		System.out.println("线程组中活动的线程数量为：" + Thread.currentThread().getThreadGroup().activeCount());
		System.out.println("线程组中线程组的数量_加之前：" + Thread.currentThread().getThreadGroup().activeGroupCount());
		
		new ThreadGroup(Thread.currentThread().getThreadGroup(), "group");
		
		System.out.println("线程组中线程组的数量_加之后：" + Thread.currentThread().getThreadGroup().activeGroupCount());
		System.out.println("父线程组的名称为：" + Thread.currentThread().getThreadGroup().getParent().getName());
	}

}
